<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>修改密码</title>
   <%@include file="../common/header.jsp" %>
</head>
<body>
<%@include file="../common/top.jsp" %>

<div class="section clearfix" style="margin-top: 10px;">
    <!--页面左边-->
  		<%@include file="left.jsp" %>
    <!--/页面左边-->

    <!--页面左边-->
    <div class="right-auto">
        <div class="bg-wrap" style="min-height:765px;">


            <div class="sub-tit " style="margin: 0px;">
                <a class="add" href="javascript:history.go(-1);"><i class="iconfont icon-reply"></i>返回</a>
                <ul>
                    <li class="selected">
                        <a href="javascript:;">修改密码</a>
                    </li>
                </ul>
            </div>

        <form id="main-form" action="${pathUrl }/home/center/submitPassword" method="post">
            <div class="form-box">
                <dl class="form-group">
                    <dt>用户名：</dt>
                    <dd>${sessionScope.vipUserSession.username }</dd>
                </dl>
                <dl class="form-group">
                    <dt>旧密码：</dt>
                    <dd>
                        <input name="oldPassword" id="txtOldPassword" type="password" class="input" >
                        <span class="Validform_checktip"></span></dd>
                </dl>
                <dl class="form-group">
                    <dt>新密码：</dt>
                    <dd>
                        <input name="newPassword" id="txtPassword" type="password" class="input">
                        <span class="Validform_checktip"></span></dd>
                </dl>
                <dl class="form-group">
                    <dt>确认新密码：</dt>
                    <dd>
                        <input name="newPassword1" id="txtPassword1" type="password" class="input" >
                        <span class="Validform_checktip"></span>
                    </dd>
                </dl>
                <dl class="form-group">
                    <dd>
                        <input id="btnSubmit" name="btnSubmit" type="button" value="确认修改" class="submit">
                    </dd>
                </dl>
            </div>
		</form>

        </div>
    </div>
    <!--/页面左边-->
</div>
<script type="text/javascript">
   $(function(){
	   $("#btnSubmit").click(function(){
		   var url=$("#main-form").attr("action");
		   var data=$("#main-form").serializeArray();
		   $.post(url,data,function(resultObj){
			   if(resultObj.status==1){
				   alert(resultObj.msg);
				   window.location.href = "${pathUrl}/home/index/login";
			   }else{
				   alert(resultObj.msg);
				}
		   });
	   });
   });
</script>
</body>
</html>